import { makeObservable, observable } from 'mobx'

let count = 0

function getRandom(min, max) {
    return Math.floor(Math.random() * (max - min + 1) + min);
}

class AppleItemStore {
    id = count++
    weight = getRandom(200, 250)
    isEaten = false
    constructor() {
        makeObservable(this, {
            isEaten: observable
        })
    }
}

export default AppleItemStore
